package ajaxTestSuite;

import com.thoughtworks.selenium.SeleneseTestCase;

public class AsyncFileUpload extends SeleneseTestCase {
	@Override
	public void setUp() throws Exception {
		setUp("http://www.asp.net/", "*firefox");
		selenium.setSpeed("5000");
	}

	public void testAsyncFileUpload() throws Exception {
		selenium.open("/ajax/ajaxcontroltoolkit/Samples/Default.aspx");
		selenium.waitForPageToLoad("30000");
		selenium.click("ctl00_SamplesLinks_ctl04_SamplesLink");
		selenium.waitForPageToLoad("30000");
		selenium.type("ctl00_SampleContent_AsyncFileUpload1_ctl02",
				"C:\\WINDOWS\\system32\\java.exe");
		Boolean result = selenium.isTextPresent("Uploaded size: 145184");
		verifyTrue(result);
		System.out.println("size of the uploaded file match expected: "
				+ result);
	}
}